/*
 * @Author: zhangxin 411020991@qq.com
 * @Date: 2023-04-06 09:35:28
 * @LastEditors: zhangxin 411020991@qq.com
 * @LastEditTime: 2023-04-06 10:19:35
 * @FilePath: \CIMS-V6_Frontend\main\src\access.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState) {
  const { currentUser } = initialState ?? {};
  return {
    canAdmin: currentUser && currentUser.access === 'admin',
  };
}
